package com.liqiang.test;

public class OldMan {

	private int age;

	public OldMan(int age) {
		super();
		this.age = age;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public String toString() {
		return "OldMan [age=" + age + "]";
	}
	
	public void eat(){
		OldManPeople oldManPeople = new OldManPeople();
		String name = oldManPeople.service(new ManName()).getName();
		System.out.println(name);
		System.out.println(this.age);
	}
	
	public static void main(String[] args) {
		
		OldMan oldMan = new OldMan(28);
		oldMan.eat();
	}
	
}
